package com.alan.libapi.business.dao;

/**
 * AsyncTaskThread
 * @author JajuanWang
 * @date 2015-09-02 17:45
 * @version V1.0
 */
public abstract class AsyncTaskThread implements Runnable  {


	private Thread thread;
	
	public void execute() {
		if((thread == null)) {
			thread = new Thread(this);
			thread.start();
		}
	}
	
	public void stop() {
		if((thread != null)) {
			thread.interrupt();
			thread = null;
		}
	}
	
}
